<template>
  <div class="detailDialog">
    <el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="资料预览" width="50%">
      <iframe
        :src="src"
        frameborder="0"
        width="100%"
        height="400px"
        allowfullscreen
        webkitallowfullscreen
        scrolling="yes"
      >
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
        </head>
      </iframe>
      <span slot="footer" class="dialog-footer">
        <p style="float:left;color:#737373;">资源编号: {{ beta }}</p>
        <el-button @click="handleClose">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    dialog: {
      type: Boolean,
      default: false
    },
    src: {
      type: String,
      default: null
    },
    beta: {
      type: String,
      default: null
    }
  },
  data() {
    return {

    }
  },
  computed: {
    dialogVisible() {
      return this.dialog
    }
  },
  methods: {
    handleClose() {
      this.$emit('closeDetail')
    }
  }
}
</script>

<style lang="scss">
</style>
